import yagmail,yaml,os,logging,email
import pytest,allure



# 参数化
def qudong(file):
    with open(file,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)
# 日志
def log():
    logging.basicConfig(
        filename='rizhi.txt',
        level=logging.DEBUG,
        filemode='a+',
        format='%(filename)s' '%(levelname)s' '%(asctime)s' '%(message)s' '%(lineno)d'
    )


# 邮件
def youjian(file):
    mail=yagmail.SMTP(user='2018675435@qq.com',password='nnqakcckuzyqfebd',host='smtp.qq.com')
    mail.send(to='2018675435@qq.com',subject='图书系统测试报告',contents=file)

